﻿/*-----------------------------------------------
// File: InstructRespect.cs
// Description: 期望结构
// Author: Shaobing	492057342@qq.com
-----------------------------------------------*/
using UnityEngine;
using System.Collections;
using System.Collections.Generic;

namespace Battle.View
{
    public delegate void OnResponse(ResponseBase response);
    public class RespectBase {
        OnResponse onResponse;
        public void AddResponseCallBack(OnResponse _onResponse) {
            onResponse += _onResponse;
        }
        public void ReceiveResponse(ResponseBase response) {
            if (onResponse != null) {
                onResponse(response);
            }
        }
        public virtual string GetDesc() { return ""; }
    }

    public class ProjectileRespect : AttackRespect {

        public ProjectileRespect(string uid, SkillType t, string HSRId) : base(uid, t, HSRId) { }
    }

    /// <summary>
    /// 技能攻击的期望，谁释放的哪个技能的哪个release
    /// </summary>
    public class AttackRespect : RespectBase {
        public string sourceUid;
        public SkillType skillType;
        public string releaseId;
        public AttackRespect(string uid, SkillType t, string HSRId) {
            sourceUid = uid;
            skillType = t;
            releaseId = HSRId;
        }
        public override string GetDesc()
        {
            return "[AttackRespect] Source:" + sourceUid + " SkillType:" + skillType + " ReleaseId:" + releaseId;
        }
    }

}